import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class MyOD{
    public static void main(String[]args) throws IOException{
        File file = new File(args[0]);
        byte arr [] = new byte[(int)file.length()];
        char arr1 [] =new char[(int)file.length()];

        FileInputStream f1 = new FileInputStream(args[0]);
        FileInputStream f2 = new FileInputStream(args[0]);
        for(int n : arr1){
            arr1[n] = (char)f2.read();
        }
        while(f1.read(arr)!=-1){
            int length = (int)file.length()/16;
            int wide = (int)file.length()%16;
            if(length==0){
                length++;
            }
            for(int l = 0;l<length;l++){
                System.out.print("\n");
                System.out.printf("%o",16*l);
                System.out.print("\t");
                for(int w = l*16;w<l*16+16;w++){
                    System.out.printf("%x",arr[w]);
                    System.out.print(" " + "\t");
                }
                System.out.print("\n");
                System.out.print(" " + "\t");
                for(int v = l*16;v<l*16+16;v++){
                    System.out.print(arr1[v]+ "/t"+" ");
                }
            }
            if (wide != 0) {
                System.out.print("/n");
                System.out.printf("%o",16*wide);
                System.out.print("\t");
                for(int m = 0;m<wide;m++){
                    System.out.printf("%x",arr[16*length+m]);
                    System.out.print(" "+"\t");
                }
                System.out.print("\n");
                System.out.print(" " + "\t");
                for(int j = 0;j<wide;j++){
                    System.out.print(arr1[16*length+j] + "\t"+" ");
                }
                System.out.print("\n");
                System.out.printf("%x",(int)file.length());
            }
        }
    }
}
